package com.xpgk.beetl.tag;

import java.io.IOException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.beetl.core.Tag;

import com.jfinal.kit.StrKit;
import com.jfinal.log.Log;
import com.xpgk.constant.ConstantRender;
import com.xpgk.mvc.codeSet.Code;
import com.xpgk.tools.ToolSqlXml;

/**
 * 参数输出标签：支持select、radio、checkbox
 * 
 */
public class TreatmentTag extends Tag {

	private static final Log log = Log.getLog(TreatmentTag.class);

	@SuppressWarnings("unchecked")
	@Override
	public void render() {
		try {
			Map<String, String> param = (Map<String, String>) args[1];

			if(log.isDebugEnabled()) log.debug("获取标签属性");

			String id = param.get("id") == null ? "" : param.get("id");
			String name = param.get("name") == null ? "" : param.get("name");
			
			String class_ = param.get("class") == null ? "" : param.get("class");
			String style = param.get("style") == null ? "" : param.get("style");
			String dataOptions = param.get("dataOptions") == null ? "" : param.get("dataOptions");

			ctx.byteWriter.writeString(select(id, name, class_, style, dataOptions));
			
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
	
	/**
	 * 下拉标签 value=ids
	 * @param id
	 * @param name
	 * @param class_
	 * @param style
	 * @param number
	 * @param defaultnumber
	 * @return
	 */
	private String select(String id, String name, String class_, String style, String data_options){
		StringBuilder sb = new StringBuilder();
		
		return sb.toString();
	}
}
